Scanning relatively large areas may be accomplished by scanning small areas (sometimes called "patches") of the large areas, in turn, employing a stepping operation in which the scanning of each subsequent patch or small area begins at the boundary, or the end, of a previous small area. This type of scanning is known as double mode "stitching", and the patches are ideally stitched together so that they abut exactly. Each of the small areas is usually scanned by a beam of photons, electrons, ions, or other particles, and the operation of stepping from one small area to the next may be effected by mechanical means. Stitching errors may arise when the abutment of two areas is inaccurate, as a result of one small area not beginning exactly at the boundary line of the previous small area. There may, for example be a gap, or an overlap. The small areas may typically, but not necessarily, incorporate sets of scanning or grating lines which are spaced by less than one micron from one another.